package com.ssm.service.impl;

import com.ssm.dao.StuDao;
import com.ssm.pojo.Stu;
import com.ssm.pojo.StuMistakeData;
import com.ssm.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StuServiceImpl implements StuService {

    @Autowired
    StuDao stuDao;

    public List<Stu> queryAll(String cdorm) {
        return stuDao.queryAll(cdorm);
    }

    public List<StuMistakeData> queryAllCdorm(String cdorm) {
        return stuDao.queryAllCdorm(cdorm);
    }

    public Stu query(String number) {
        return stuDao.query(number);
    }

    public int addStuList(List<Stu> list) {
        return stuDao.addStuList(list);
    }

    public void deleteStu(String number) {
        stuDao.deleteStu(number);
    }

    public void deleteStuList(List<String> list) {
        stuDao.deleteStuList(list);
    }

    public void stuUpdate(Stu stu) {
        stuDao.stuUpdate(stu);
    }

    public List<Stu> find_name(String sname,String cdorm) {
        return stuDao.find_name(sname,cdorm);
    }

    public List<StuMistakeData> find_name_cdorm(String sname, String cdorm) {
        return stuDao.find_name_cdorm(sname,cdorm);
    }

    public List<Stu> find_cdorm(String cdorm) {
        return stuDao.find_cdorm(cdorm);
    }

    public void addStu(Stu stu) {
        stuDao.addStu(stu);
    }
}
